package com.game.gameshoppingcenter.service;

import com.game.gameshoppingcenter.dao.CommentRepository;
import com.game.gameshoppingcenter.entities.Comment;
import com.game.gameshoppingcenter.entities.Orders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService {
    @Autowired
    CommentRepository commentRepository;
    public Comment save( Comment comment){
        return commentRepository.save(comment);
    }
    public Comment getcontent(){
        return commentRepository.findByContent();
    }
    public List<Comment> getcomment(){
        return commentRepository.findAll();
    }
}
